<?php
/**
 * CakePOWER
 * Plugins Bootstrap
 * 
 * @author:			Marco Pegoraro
 * @mail:			marco(dot)pegoraro(at)gmail(dot)com
 * 
 * 22 September 2009
 * This file try to bootstrap loaded plugins.
 * 
 * The order of the search is determined by the configuration of each plugin.
 * 
 */

/**
 * Plugins Bootstrapping.
 */
foreach ( DAC::read('sys.plugin') as $pluginName=>$plugin ) {
	
	// Compose the bootstrap.php path and try to load it into system.                     #
	$tmp = DAC::read('sys.plugin.'.$pluginName.'.path').'config'.DS.'bootstrap.php';
	if ( file_exists($tmp) ) require_once($tmp);
	
}

/**
 * Clean local variables.
 */
unset( $plugin );
unset( $pluginName );
?>